<#include "../../header.ftl" />
<@head title="修改文章分类" />
		<script type="text/javascript" src="${base}/script/mlog.form.js" charset="utf-8"></script>
		<script type="text/javascript" src="${base}/script/jquery-validation/jquery.validate.js"></script>
		<script type="text/javascript" src="${base}/script/jquery-validation/jquery.metadata.js"></script>
		<script type="text/javascript" src="${base}/script/jquery-validation/validate.method.js"></script>
		<script type="text/javascript">
			$(document).ready(function(){
				mlog.form.validate({
					selector : "#createPostCatalogForm",
					errorLabelContainer : "#error",
					wrapper: 'li',
					onfocusout : false,
					onkeyup : false,
					onclick : false
				});
			});
		</script>
		<@side.sidenav active="分类管理"/>
	    <div class="g-content">
	        <div class="g-content-container">
	            <div class="g-p">
					<div class="m-crumb">
					    <ul class="f-cb">
					        <li><i>&gt;</i><a href="${spaceUrl}/admin/post/list">博客管理</a></li>
					        <li><i>&gt;</i><a href="javascript:void(0);">分类管理</a></li>
					    </ul>
					</div>
					<div class="page-title">
						<h1>分类管理</h1>
					</div>
					<div class="m-content">
						<div class="typo">
							<form name="createPostCatalogForm" id="createPostCatalogForm" action="${spaceUrl}/admin/post/catalog/edit/do" method="POST">
								<div id="error" class="message error" style="display:none;"></div>
								<@spring.bind "postCatalog" />
								<@spring.formHiddenInput path="postCatalog.id" />
								<@spring.formHiddenInput path="postCatalog.createTime" />
								<@spring.formHiddenInput path="postCatalog.user.id" />
								<div class="label">
									<span class="title">名称：</span>
									<@spring.formInput path="postCatalog.name" attributes='validate=\'{required:true,maxlength:10, messages:{required:"请输入分类名称", maxlength:"分类名称字数不能超过{0}"}}\' placeholder="请输入分类名称" class="input input-large" ' />
								</div>
								<div class="label">
									<span class="title">排序：</span>
									<@spring.formInput path="postCatalog.order" attributes='validate=\'{range:[0,300], digits: true, messages:{range:"排序号范围不能超过{0}-{1}", digits:"排序号必须为正整数"}}\' placeholder="请输入分类排序" class="input input-large"' />
								</div>
								<div class="label">
									<span class="title">描述：</span>
									<@spring.formTextarea path="postCatalog.description" attributes='validate=\'{maxlength: 300, messages:{maxlength:"描述最大长度不能超过{0}"}}\' placeholder="请输入分类排序" class="input input-large"' />
								</div>
								<div class="label">
									<input type="submit" class="button" value="提交" style="margin-left:46px;"/>
								</div>
							</form>
						</div>
					</div>
	            </div>
	        </div>
	    </div>
<#include "../../footer.ftl" />